<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Swige 框架 - 高性能 PHP 开发平台</title>
    <meta name="description" content="基于 Swige 的高性能 PHP 框架，提供完整的开发工具和丰富的组件生态">
    <link rel="stylesheet" href="/css/style.css">
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar">
        <div class="container">
            <div class="nav-brand">
                <span class="logo">⚡</span>
                <span class="brand-text">Swige</span>
            </div>
            <ul class="nav-menu">
                <li><a href="#features">特性</a></li>
                <li><a href="#demo">演示</a></li>
                <li><a href="#docs">文档</a></li>
                <li><a href="#community">社区</a></li>
            </ul>
            <button class="nav-toggle" aria-label="切换菜单">
                <span></span>
                <span></span>
                <span></span>
            </button>
        </div>
    </nav>

    <!-- 英雄区域 -->
    <section class="hero">
        <div class="container">
            <div class="hero-content">
                <h1 class="hero-title">构建高性能的 PHP 应用</h1>
                <p class="hero-description">
                    基于 Swige 的现代化 PHP 全栈框架，提供极致的性能和开发体验
                </p>
                <div class="hero-actions">
                    <a href="#demo" class="btn btn-primary">开始体验</a>
                    <a href="#docs" class="btn btn-secondary">查看文档</a>
                </div>
            </div>
            <div class="hero-visual">
                <div class="code-window">
                    <div class="window-header">
                        <div class="window-controls">
                            <span class="control red"></span>
                            <span class="control yellow"></span>
                            <span class="control green"></span>
                        </div>
                        <span class="window-title">server.php</span>
                    </div>
                    <div class="code-content">
                        <pre><code class="language-php">$server = new Swoole\HTTP\Server('0.0.0.0', 9501);

$server->on('request', function ($request, $response) {
    $response->header('Content-Type', 'application/json');
    $response->end(json_encode([
        'message' => 'Hello Swoole!',
        'timestamp' => time()
    ]));
});

echo "🚀 Server started at http://0.0.0.0:9501\n";
$server->start();</code></pre>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- 特性展示 -->
    <section id="features" class="features">
        <div class="container">
            <h2 class="section-title">核心特性</h2>
            <div class="features-grid">
                <div class="feature-card">
                    <div class="feature-icon">🚀</div>
                    <h3>极致性能</h3>
                    <p>基于 Swige 协程驱动，性能相比传统 PHP-FPM 提升 10-100 倍</p>
                </div>
                <div class="feature-card">
                    <div class="feature-icon">⚡</div>
                    <h3>全异步非阻塞</h3>
                    <p>支持 MySQL、Redis、HTTP 等组件的全异步协程操作</p>
                </div>
                <div class="feature-card">
                    <div class="feature-icon">🔧</div>
                    <h3>开箱即用</h3>
                    <p>提供完整的开发工具链和丰富的组件生态</p>
                </div>
                <div class="feature-card">
                    <div class="feature-icon">📦</div>
                    <h3>模块化设计</h3>
                    <p>支持灵活的模块化和组件化开发</p>
                </div>
            </div>
        </div>
    </section>

    <!-- 演示区域 -->
    <section id="demo" class="demo">
        <div class="container">
            <h2 class="section-title">在线演示</h2>
            <div class="demo-content">
                <div class="demo-controls">
                    <button class="demo-btn active" data-api="/api/hello">基础接口</button>
                    <button class="demo-btn" data-api="/api/users">用户数据</button>
                    <button class="demo-btn" data-api="/api/products">产品列表</button>
                </div>
                <div class="demo-result">
                    <div class="result-header">
                        <h4>API 响应结果</h4>
                        <button class="copy-btn" title="复制结果">
                            <span>📋</span>
                        </button>
                    </div>
                    <div class="result-content">
                        <pre><code class="language-json" id="api-result">{
  "status": "等待请求",
  "message": "点击上方按钮测试接口"
}</code></pre>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- 文档链接 -->
    <section id="docs" class="documentation">
        <div class="container">
            <h2 class="section-title">开发文档</h2>
            <div class="docs-grid">
                <a href="/docs/quick-start" class="doc-card">
                    <h3>📖 快速开始</h3>
                    <p>5分钟上手 Swige 框架</p>
                </a>
                <a href="/docs/configuration" class="doc-card">
                    <h3>⚙️ 配置指南</h3>
                    <p>完整的配置说明和最佳实践</p>
                </a>
                <a href="/docs/api" class="doc-card">
                    <h3>🔗 API 文档</h3>
                    <p>详细的接口说明和示例</p>
                </a>
                <a href="/docs/deployment" class="doc-card">
                    <h3>🚀 部署指南</h3>
                    <p>生产环境部署和优化</p>
                </a>
            </div>
        </div>
    </section>

    <!-- 社区支持 -->
    <section id="community" class="community">
        <div class="container">
            <h2 class="section-title">加入社区</h2>
            <div class="community-content">
                <p>欢迎加入我们的开发者社区，获取帮助和分享经验</p>
                <div class="social-links">
                    <a href="https://github.com/swoole/framework" class="social-link">
                        <span>🐙 GitHub</span>
                    </a>
                    <a href="https://t.me/swoole" class="social-link">
                        <span>💬 Telegram</span>
                    </a>
                    <a href="https://discord.gg/swoole" class="social-link">
                        <span>🎮 Discord</span>
                    </a>
                </div>
            </div>
        </div>
    </section>

    <!-- 页脚 -->
    <footer class="footer">
        <div class="container">
            <p>&copy; 2024 Swige 框架. 基于 MIT 许可证开源.</p>
            <p>🚀 构建高性能的 PHP 应用</p>
        </div>
    </footer>

    <script src="/js/app.js"></script>
</body>
</html>